BORDER

Syntax: BORDER [#channel,] size [,colour]     
    or: BORDER [#channel]
Location: QL ROM

This command allows you to add a coloured border around the inside of the edge of the specified window (default #1). If the second syntax is used, this will turn off the border on the specified window - this is the same as:

BORDER [#channel,] 0

If a border is present around the window, the physical size of the window is altered, so that PRINT and LINE commands (for instance) will not overwrite the border. Please note however, that the window is reset to its original size prior to a BORDER command and therefore two successive border commands only have the same effect as the second BORDER command on its own.

As with other graphics commands, colour can actually be up to three parameters forming a composite colour.

If no value is given for colour a transparent border will be added to the given window. This means that a border will be created, but anything which already appears in that border will not be affected.

Once the border has been re-drawn the cursor is automatically placed at the top left hand position (0,0) just inside the border.

Example:
To produce a 'take-off' effect:

100 MODE 8 
110 WINDOW 448,200,32,16 
120 FOR i=1 TO 99 
130   BORDER i,2 
140 END FOR i    

NOTE:
If a border appears in a window, there is always a width of at least two pixels down the sides to ensure that the border will appear in MODE 8. Take the width value and if it is odd, add one for the width down the sides of the window.

The second syntax will not work on all systems.

CROSS-REFERENCE:
INK describes composite colours.
Also see WINDOW.
